<!--
	作者：956911785@qq.com
	时间：2019年10月10日15:26:23
	描述：学生积分数据统计搜索
-->
<template>
    <div style="width:100%;"> 
		<Tetable ref="tdtable" height="450" :columns="columns9" type="post" :paramiters="searchparams" :serverUrl="serverUrl" @changeSort='changeSort'></Tetable>
		<lookbook ref="lookbook" :usid="usid" :title="title"></lookbook>
		<lookpoetry ref="lookpoetry" :usid="usid" :title="title"></lookpoetry>
	</div> 
</template>
<script>
	import lookbook from "./lookbook";
	import lookpoetry from "./lookpoetry";
    export default {
    	name: "studentdatass",
    	props: {
    		tj:{
    			type: Object
    		},	
    	},
        data () {
            return {
				usid:'',
				title:'',
				searchparams:{
					nj:'',//年级
					bj:'',//班级
					sname:'',//姓名
					order:'JFNUM desc',//排序情况
				},
            	serverUrl:"/host/readbook/staticlog/studentDataStatic.html",
                columns9: [
                    {
                        type: 'index',
                        width: 60,
                        title: '序号',
                        align: 'center'
                    },{
                        title: '年级',
                        key: 'NJ',
                        align: 'center', 
						sortable: true
                    }, {
                        title: '班级',
                        key: 'BJ',
                        align: 'center', 
						sortable: true
                    }, {
                        title: '姓名',
                        key: 'NAME',
                        align: 'center', 
                    },  {
                        title: '书籍阅读总数',
                        key: 'PLANLOG',
                        align: 'center', 
						sortable: true,
						render: (h, params) => {
							return h("a", { 
						    	on: { 
						    		click: () => {
										this.usid=params.row.USID;
										this.title=params.row.NAME+"同学个人阅读数据中心";
						    			this.$refs.lookbook.modal0=true;
						    		}
						    	} 
							},params.row.PLANLOG)
						}
                    }, {
                        title: '好词好句好段',
                        key: 'HCHJHD',
                        align: 'center',
						sortable: true,
						render: (h, params) => {
							return h("a", { 
						    	on: { 
						    		click: () => {
										this.usid=params.row.USID;
										this.title=params.row.NAME+"同学个人阅读数据中心";
						    			this.$refs.lookbook.modal0=true;
						    		}
						    	} 
							},params.row.HCHJHD)
						}
                    },{
                        title: '章节读后感',
                        key: 'ZJDHG',
                        align: 'center',
						sortable: true,
						render: (h, params) => {
							return h("a", { 
						    	on: { 
						    		click: () => {
										this.usid=params.row.USID;
										this.title=params.row.NAME+"同学个人阅读数据中心";
						    			this.$refs.lookbook.modal0=true;
						    		}
						    	} 
							},params.row.ZJDHG)
						}
                    }, {
                        title: '诗词阅读数',
                        key: 'PLOG',
                        align: 'center', 
						sortable: true,
						render: (h, params) => {
							return h("a", { 
						    	on: { 
						    		click: () => {
										this.usid=params.row.USID;
										this.title=params.row.NAME+"同学个人诗词数据中心";
						    			this.$refs.lookpoetry.modal0=true;
						    		}
						    	} 
							},params.row.PLOG)
						}
                    }, {
                        title: '总积分',
                        key: 'JFNUM',
                        align: 'center', 
						sortable: true,
                    }
                ],
            }
        },
        computed: {
		},
		methods: {
			load(){
				this.$refs.tdtable.load();
			},
			
			changeSort(column){
				this.searchparams.order=column.key+" "+column.order;
			}

	    },
		mounted() {
			this.$refs.tdtable.load();
		},
		watch:{
			tj: {
				deep: true,
				handler: function() {
					this.searchparams={
						nj:this.tj.nj,//年级
						bj:this.tj.bj,//班级
						sname:this.tj.sname,//姓名
						order:'JFNUM desc',//排序情况
					}
				},	
			}
			
		},
		components: {
			lookbook,
			lookpoetry
		}
    }
</script>


<style scoped="scoped">
	
	.ivu-table-wrapper {
		border:none;
	}
	
	.toolstipdiv{
		width: '100%';
		overflow: 'hidden';
		textOverflow: 'ellipsis';
		whiteSpace: 'normal';
		wordBreak: 'break-all';
		color:'#fff';
		text-align: center;
	}
	.toolstipdiv:hover{
		background:rgb(63, 193, 201);
	}
	
	.ivu-tooltip-rel label:hover{
		color:#0023FB;
	}
	
	.tablediv{
		height: '40px';
		overflow:'hidden';
		line-height: '40px';
	}
</style>



